#include "stdafx.h"
#include "../Engine/World.hpp"

namespace he
{
	World::World(MapPtr_t const &pMap, boost::filesystem::path const &TerrainDefinitionPath)
		: m_pMap(pMap),
		m_TerrainMaterialManager(TerrainDefinitionPath),
		m_BuildingMaterialManager(TerrainDefinitionPath)
	{
	}

	Map &World::map()
	{
		return *m_pMap;
	}
	
	Map const &World::map() const
	{
		return *m_pMap;
	}

	BuildingVector_t const &World::buildings() const
	{
		return m_Buildings;
	}

	void World::add(BuildingPtr_t &&pBuilding)
	{
		m_Buildings.push_back(std::move(pBuilding));
	}

	TerrainMaterialManager const &World::terrain_material_manager() const
	{
		return m_TerrainMaterialManager;
	}

	BuildingMaterialManager const &World::building_material_manager() const
	{
		return m_BuildingMaterialManager;
	}
} /*he*/